<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-jms</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
The JMS binding in SwitchYard provides support for asynchronous communication with messaging providers. It supports both sides - service and reference.
The JMS binding is built on top of camel-jms and supports most of options for this endpoint. Please reffer camel documentation for detailed description of them.
This binding have it's own namespace. To use it you must declare namespace with uri *urn:switchyard-component-camel-jms:config:1.0*. Your Maven project should also have following dependency:
<dependency> <groupId>org.switchyard.components</groupId> <artifactId>switchyard-component-camel-jms</artifactId> <version>SWITCHYARD-VERSION</version> </dependency>
https://issues.jboss.org/browse/SWITCHYARD-1285 - Declarative transaction management by the Transaction Policy doesn't work with camel-jms properly. We are investigating how can we solve it, but you may want to use JCA gateway instead for now.
Following options can be apile to <binding.jms> definition:
queue or topic : destination name to consume from/produce to
connectionFactory : an instance of connection factory to use
username
password
clientId
durableSubscriptionName
concurrentConsumers
maxConcurrentConsumers
disableReplyTo
preserveMessageQos
deliveryPersistent
priority
explicitQosEnabled
replyTo
replyToType
requestTimeout
selector
timeToLive
transacted
transactionManager
Here's an example of what a jms service binding looks like:
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0"> <sca:service name="GreetingService" promote="GreetingService"> <camel:binding.jms> <camel:queue>INCOMING_GREETS</camel:queue> <camel:connectionFactory>#connectionFactory</camel:connectionFactory> <camel:username>esb</camel:username> <camel:password>rox</camel:password> <camel:selector>RECEIVER='ESB' AND SENDER='ERP'<camel:selector> </camel:binding.jms> </sca:service> </sca:composite>
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0"> <sca:reference name="GreetingService" promote="camel-binding/GreetingService" multiplicity="1..1"> <camel:binding.jms> <camel:topic>GREETINGS_NOTIFICATION</camel:topic> <camel:connectionFactory>#connectionFactory</camel:connectionFactory> <camel:priority>8</camel:priority> <camel:binding.jms> </sca:reference> </sca:composite>